@import url("Web.Base.css");

form {
	width: calc(100% - 10px);
	margin-left: 5px;
	margin-right: 5px;

	margin-bottom: 10px;
}

form label {
	display: flex;
	align-items: center;
	user-select: none;
	justify-content: flex-start;

	margin-top: 5px;

	user-select: none;
	color: #e0e0e0;
}

textarea {
	resize: none;
	height: 10ch;
	min-height: 10ch;
	max-height: none;
}

input[type="text"],
input[type="password"],
input[type="number"],
input[type="search"],
input[type="tel"],
input[type="url"],
input[type="email"],
textarea {
	display: block;
	background-color: #00000059;

	color: #bbb;

	font-size: 18px;

	width: calc(100% - 10px);
	border-style: solid;
	border-color: transparent;

	padding: 1px 2.5px;
	font-weight: 500;

	border-width: 3px;
}

input[type="text"],
input[type="password"],
input[type="number"],
input[type="search"],
input[type="tel"],
input[type="url"],
input[type="email"] {
	vertical-align: middle;
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="search"]:focus,
input[type="tel"]:focus,
input[type="url"]:focus,
input[type="email"]:focus,
textarea:focus {
	border-color: #0e3b00af;
}

input[type="text"]:disabled,
input[type="password"]:disabled,
input[type="number"]:disabled,
input[type="search"]:disabled,
input[type="tel"]:disabled,
input[type="url"]:disabled,
input[type="email"]:disabled,
textarea:disabled {
	background-color: #ffffff0c;
	border-color: #2525255b;

	cursor: not-allowed;
}

input[type="text"].\.error,
input[type="password"].\.error,
input[type="number"].\.error,
input[type="search"].\.error,
input[type="tel"].\.error,
input[type="url"].\.error,
input[type="email"].\.error,
/*---*/
input[type="text"]:invalid,
input[type="password"]:invalid,
input[type="number"]:invalid,
input[type="search"]:invalid,
input[type="tel"]:invalid,
input[type="url"]:invalid,
input[type="email"]:invalid,
/*---*/
textarea:invalid,
textarea.\.error {
	border-color: #ff000032;
}

input[type="text"]:focus.\.error,
input[type="password"]:focus.\.error,
input[type="number"]:focus.\.error,
input[type="search"]:focus.\.error,
input[type="tel"]:focus.\.error,
input[type="url"]:focus.\.error,
input[type="email"]:focus.\.error,
/*---*/
input[type="text"]:focus:invalid,
input[type="password"]:focus:invalid,
input[type="number"]:focus:invalid,
input[type="search"]:focus:invalid,
input[type="tel"]:focus:invalid,
input[type="url"]:focus:invalid,
input[type="email"]:focus:invalid,
/*---*/
textarea:focus:invalid,
textarea:focus.\.error {
	border-color: #ffee0032;
}

input[type="number"] {
	max-width: 15ch;
}

input[type="text"],
input[type="password"],
input[type="search"],
input[type="tel"],
input[type="url"],
input[type="email"] {
	max-width: 60ch;
}

input[type="radio"],
input[type="checkbox"] {
	position: absolute;
	z-index: -1000;
	opacity: 0;

	appearance: none;
	;
}

input[type="radio"]+label::before,
input[type="checkbox"]+label::before {
	content: '';
	display: block;
	flex-shrink: 0;
	flex-grow: 0;

	width: 1.1em;
	height: 1.1em;

	transform: translate(0, 10%);

	border: 3px solid #151515;
	/*КОСТЫЛЬ*/
	border-radius: 0.00001px;
	margin-right: 0.5em;
	background-color: #151515;

	align-self: center;
	cursor: pointer;
}

input[type="radio"]:checked+label::before,
input[type="checkbox"]:checked+label::before {
	background-color: #2e8613d2;
	border-color: #000000a0;
}

input[type="radio"]:hover:not(:disabled)+label::before,
input[type="checkbox"]:hover:not(:disabled)+label::before {
	border-color: #0e3b00d2;
}

.object[data-type="select-input"]>:nth-child(1):disabled,
.object[data-type="select-input"]>:nth-child(2).\.disabled,
/*---*/
.object[data-type="-si"]>:nth-child(1):disabled,
.object[data-type="-si"]>:nth-child(2).\.disabled,
/*---*/
input[type="radio"]:disabled+label::before,
input[type="checkbox"]:disabled+label::before {
	background-color: #2525257e;
	border-color: #252525d0;

	cursor: not-allowed;
}

input[type="radio"]:disabled:checked+label::before,
input[type="checkbox"]:disabled:checked+label::before {
	background-color: #305824d2;
}

input[type="radio"]+label::before {
	border-radius: 50%;
}

form button:not(:hover):not(:disabled) {
	background-color: #0000005c;
}

textarea.src {
	font-family: 'Consolas', monospace;
}

textarea.big {
	height: 35.5ch;
}

/*-------*/

form .block {
	margin-bottom: 10px;
}

form .block label {
	display: flex;
}

form .block>p:first-child {
	font-size: 18px;
	font-weight: 550;

	margin-bottom: 5px;
}

form .block>p:first-child.\.required::after {
	content: "*";
	color: #ff7979;
}

/*-------*/

.lopt {
	display: flex;
	align-items: center;

	justify-content: space-between;

	gap: 15px;
}

/*-------*/

.object[data-type="select-input"]>:nth-child(2)>:nth-child(2)::-webkit-scrollbar,
.object[data-type="-si"]>:nth-child(2)>:nth-child(2)::-webkit-scrollbar,
textarea::-webkit-scrollbar {
	width: 10px;
	height: 10px;
}

/*-------*/

body.no-js input[type="text"],
body.no-js input[type="password"],
body.no-js input[type="number"],
body.no-js input[type="search"],
body.no-js input[type="tel"],
body.no-js input[type="url"],
body.no-js input[type="email"],
body.no-js textarea,
/*---*/
body.js-run input[type="text"],
body.js-run input[type="password"],
body.js-run input[type="number"],
body.js-run input[type="search"],
body.js-run input[type="tel"],
body.js-run input[type="url"],
body.js-run input[type="email"],
body.js-run textarea {
	transition-property: border-color;
	transition-duration: 0.1s;
	transition-timing-function: linear;
}

body.no-js .object[data-type="select-input"]>:nth-child(1),
body.no-js .object[data-type="select-input"]>:nth-child(2),
/*---*/
body.no-js .object[data-type="-si"]>:nth-child(1),
body.no-js .object[data-type="-si"]>:nth-child(2),
/*---*/
body.no-js .form\:select>select,
body.no-js input[type="radio"]+label::before,
body.no-js input[type="checkbox"]+label::before,
/*---*/
body.js-run .object[data-type="select-input"]>:nth-child(1),
body.js-run .object[data-type="select-input"]>:nth-child(2),
/*---*/
body.js-run .object[data-type="-si"]>:nth-child(1),
body.js-run .object[data-type="-si"]>:nth-child(2),
/*---*/
body.js-run input[type="radio"]+label::before,
body.js-run input[type="checkbox"]+label::before {
	transition-property: background-color, border-color;
	transition-duration: 0.25s;
	transition-timing-function: linear;
}

/*-------*/

form *:not(.object, .object *, ul>*, ol>*, table *, section, h1, h2, h3, h4, h5, h6) {
	margin-bottom: 7.5px;
}

form table>caption {
	margin-bottom: 7.5px;
}

form *:not(a>img):last-child {
	margin-bottom: 0 !important;
}

form h2 {
	margin-bottom: 25px;
}

form h3 {
	margin-bottom: 20px;
}

form h4 {
	margin-bottom: 15px;
}

form h5 {
	margin-bottom: 15px;
}

form h6 {
	margin-bottom: 10px;
}

/*-------*/

form section {
	margin-bottom: 15px;
}

form section::after {
	content: "";
	display: block;

	width: 100%;

	margin-top: 0.75ch;

	border-bottom-style: dashed;
	border-width: 3px;
	border-color: #58585820;
}

/*-------*/

.object[data-type="number-input"],
.object[data-type="-ni"] {
	display: flex;
	flex-direction: row;
}

.object[data-type="number-input"]>*,
.object[data-type="-ni"]>* {
	margin-top: 0;
	margin-bottom: 0;
}

.object[data-type="number-input"]:nth-child(1),
.object[data-type="number-input"]:nth-child(2),
.object[data-type="number-input"]:nth-child(3),
/*---*/
.object[data-type="-ni"]>:nth-child(1),
.object[data-type="-ni"]>:nth-child(2),
.object[data-type="-ni"]>:nth-child(3) {
	display: block;
}

.object[data-type="number-input"]:nth-child(1),
.object[data-type="number-input"]:nth-child(3),
/*---*/
.object[data-type="-ni"]>:nth-child(1),
.object[data-type="-ni"]>:nth-child(3) {
	display: block;
	text-align: center;
	font-weight: 600;

	border: none;

	min-width: 1ch;
	font-family: 'Consolas', monospace;
}

.object[data-type="number-input"]:nth-child(1)::before,
.object[data-type="-ni"]>:nth-child(1)::before {
	content: '+';
}

.object[data-type="number-input"]:nth-child(3)::before,
.object[data-type="-ni"]>:nth-child(3)::before {
	content: '-';
}

/*-------*/

.object[data-type="select-input"],
.object[data-type="-si"] {
	display: inline-flex;
	position: relative;
	margin-bottom: 2rem;

	width: max-content;
	max-width: none;

	align-items: center;
}

.object[data-type="select-input"]>:nth-child(1),
.object[data-type="select-input"]>:nth-child(2),
/*---*/
.object[data-type="-si"]>:nth-child(1),
.object[data-type="-si"]>:nth-child(2) {
	appearance: none;

	display: inline-block;

	text-align: left;
	font-family: inherit;
	font-size: 1em;

	color: white;
	cursor: pointer;

	background-color: #00000059;

	border-style: solid;
	border-color: transparent;
	border-width: 3px;

	width: calc(100% + 2ch);

	padding: 02px 5px;
	padding-right: calc(5px + 1.75ch);
	font-weight: 500;

	max-width: calc(35ch + 1.75ch);
	text-overflow: ellipsis;
}

.object[data-type="select-input"]>:nth-child(1),
.object[data-type="-si"]>:nth-child(1) {
	max-width: calc(35ch + 1.75ch + 10px);
}

.object[data-type="select-input"]>:nth-child(1):not(:disabled):hover,
.object[data-type="select-input"]>:nth-child(2):not(:disabled):hover,
.object[data-type="select-input"]>:nth-child(2)>:nth-child(2)>:not(:disabled).\.select,
/*---*/
.object[data-type="-si"]>:nth-child(1):not(:disabled):hover,
.object[data-type="-si"]>:nth-child(2):not(:disabled):hover,
.object[data-type="-si"]>:nth-child(2)>:nth-child(2)>:not(:disabled).\.select {
	background-color: #0877008b;
	cursor: pointer;
}

.object[data-type="select-input"]>:nth-child(2)>:nth-child(2)>:not(:disabled):hover,
.object[data-type="-si"]>:nth-child(2)>:nth-child(2)>:not(:disabled):hover {
	background-color: #4e3c00;
	cursor: pointer;
}

.object[data-type="select-input"]::after,
.object[data-type="-si"]::after {
	display: block;
	position: absolute;

	content: '\e002';
	font-family: 'icons';

	right: 8px;
	pointer-events: none;
}

.object[data-type="select-input"].\.open::after,
.object[data-type="-si"].\.open::after {
	content: '\e003';
}

.object[data-type="select-input"].\.disabled::after,
.object[data-type="-si"].\.disabled::after {
	content: '\e005';
}

.object[data-type="select-input"]>:nth-child(1):disabled,
.object[data-type="select-input"]>:nth-child(2).\.disabled,
/*---*/
.object[data-type="-si"]>:nth-child(1):disabled,
.object[data-type="-si"]>:nth-child(2).\.disabled {
	cursor: not-allowed;
}

.object[data-type="select-input"]>:nth-child(2),
.object[data-type="-si"]>:nth-child(2) {
	position: relative;
}

.object[data-type="select-input"]>:nth-child(2)>:nth-child(1),
.object[data-type="-si"]>:nth-child(2)>:nth-child(1) {
	pointer-events: none;
	user-select: none;
}

.object[data-type="select-input"]>:nth-child(2)>:nth-child(2),
.object[data-type="-si"]>:nth-child(2)>:nth-child(2) {
	cursor: default;
	position: absolute;

	display: flex;
	align-items: stretch;
	flex-direction: column;

	top: calc(100% + 2px);
	left: -3px;

	flex: 0 0 max-content;
	background-color: #0A0A0A;

	inline-size: max-content;

	border-style: solid;
	border-color: hsl(0, 0%, 12%);
	border-width: 2px;

	max-height: 45vh;
	z-index: 2000;

	overflow-y: auto;
}

.object[data-type="select-input"]>:nth-child(2)>:nth-child(2).up-list,
.object[data-type="-si"]>:nth-child(2)>:nth-child(2).up-list {
	top: unset;
	bottom: calc(100% + 2px);

	flex-direction: column-reverse;
}

.object[data-type="select-input"]>:nth-child(2)>:nth-child(2):not(.\.open),
.object[data-type="-si"]>:nth-child(2)>:nth-child(2):not(.\.open) {
	display: none;
}

.object[data-type="select-input"]>:nth-child(2)>:nth-child(2)>*,
.object[data-type="-si"]>:nth-child(2)>:nth-child(2)>* {
	padding: 1px 5px;
	padding-right: calc(5px + 2*1.75ch);

	font-weight: normal;
	font-size: 1em;

	max-width: 35ch;

	user-select: none;
	white-space: nowrap;

	text-overflow: ellipsis;
	overflow: hidden;

	flex: 0 0 content;
}

.object[data-type="select-input"]>:nth-child(2)>:nth-child(2)>*.\.disabled,
.object[data-type="-si"]>:nth-child(2)>:nth-child(2)>*.\.disabled {
	color: gray;
	cursor: default;
}

.object[data-type="select-input"]>:nth-child(1)>option,
.object[data-type="-si"]>:nth-child(1)>option {
	appearance: none;

	background-color: #0A0A0A;
	border: none;
}

/*-------*/

body.no-js .object[data-type="number-input"]:nth-child(1),
body.no-js .object[data-type="number-input"]:nth-child(3),
/*---*/
body.no-js .object[data-type="-ni"]>:nth-child(1),
body.no-js .object[data-type="-ni"]>:nth-child(3) {
	display: none;
}

body:not(.no-js) .object[data-type="select-input"]>:nth-child(1),
body.no-js .object[data-type="select-input"]>:nth-child(2),
/*---*/
body:not(.no-js) .object[data-type="-si"]>:nth-child(1),
body.no-js .object[data-type="-si"]>:nth-child(2) {
	display: none;
}

body:not(.no-js) .object[data-type="select-input"],
body:not(.no-js) .object[data-type="-si"] {
	margin-bottom: 1ch;
}